package com.media.themovieworld.util;

import android.graphics.Bitmap;

import com.media.themovieworld.R;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer;

public class MovieImageLoader extends ImageLoader{

	public static DisplayImageOptions getDisplayImageOptionDefault(){
		DisplayImageOptions options = new DisplayImageOptions.Builder()
										.cacheInMemory(true)
										.cacheOnDisc(true)
										.bitmapConfig(Bitmap.Config.RGB_565)
										.considerExifParams(true)
										.showStubImage(R.drawable.no_image_video)
										.showImageForEmptyUri(R.drawable.no_image_video)
										.showImageOnFail(R.drawable.no_image_video)
										.build();
		return options;
	}
	
	public static DisplayImageOptions getDisplayImageOptionsRoundIcon(int round){
		DisplayImageOptions options = new DisplayImageOptions.Builder()
										.cacheInMemory(true)
										.cacheOnDisc(true)
										.bitmapConfig(Bitmap.Config.RGB_565)
										.considerExifParams(true)
										.showStubImage(R.drawable.no_image_video)
										.showImageForEmptyUri(R.drawable.no_image_video)
										.showImageOnFail(R.drawable.no_image_video)
										.displayer(new RoundedBitmapDisplayer(round))
										.build();
		return options;
	}
	
	public static DisplayImageOptions getDisplayImageOptionAdView(){
		DisplayImageOptions options = new DisplayImageOptions.Builder()
										.cacheInMemory(true)
										.cacheOnDisc(true)
										.bitmapConfig(Bitmap.Config.RGB_565)
										.considerExifParams(true)
										.build();
		return options;
	}
	
}
